<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../js/vue.js"></script>
    <style>
        [v-cloak]{
            display:none;
        }
        [v-text]{
            display:none;
        }
    </style>
</head>
<body>
    <div id="container">
        <h2>v-text</h2>
        <p v-text="str"></p>
        <p v-text=" '字符串' "></p>
        <p v-text="[1,2,3,4]"></p>
        <p v-text="str">哈哈哈</p>
        <h2>v-html</h2>
        <p v-html=" '<p>嘻嘻嘻嘻</p>' "></p>
        <p v-html="[1,2,3,4]"></p>
        <p v-html="str1"></p>
        <p v-text="str1"></p>
        <p>{{str1}}</p>
        <h2>v-pre</h2>
        <div v-pre>
            <p>{{str}}</p>
            <p v-text="str"></p>
            <p v-html="str1"></p>
        </div>
        <h2>v-once</h2>
        <p>{{str}}</p>
        <div v-once>
            <p>{{str}}</p>
        </div>
        <h2>v-cloak</h2>
        <div v-cloak style="color:red;">
            <p>{{str}}</p>
        </div>
        <p v-text="str" style="color:blue;">{{"aaaaaa"}}</p>
    </div>
    <script>
        setTimeout(function(){
            new Vue({
                el:"#container",
                data:{
                    str:"字符串",
                    str1:"<p style='color:red;font-size:20px;'>蔡徐坤!</p>"
                }
            });
        },5000)
    </script>
</body>
</html>